<?php

declare(strict_types=1);

namespace App\Controller\Notify;

use App\Controller\AbstractController;
use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\RequestMapping;
use App\Service\OrderService\OrderNotifyService\YstongNotifyService;
use App\Service\TaskServer\TaskWorker;

/**
 * Ystong供应商接口统一回调入口
 * @Controller(prefix="/Notify/index/userType/shopyst/messageType")
 */
class YstongController extends AbstractController
{
    /**
     * @RequestMapping(path="OrderExpress", methods="post")
     * 接收轨迹查询接口
     * @param RequestInterface $request
     */
    public function OrderExpress(RequestInterface $request)
    {
        return TaskWorker::instance()->addWebNotifyTask(YstongNotifyService::class,'OrderExpress',$request->getParsedBody());
    }
}